/*     */ package spc.webos.endpoint;
/*     */ 
/*     */ import org.apache.log4j.Logger;
/*     */ import spc.webos.cache.ICache;
/*     */ import spc.webos.queue.AbstractReceiverThread;
/*     */ import spc.webos.queue.AccessTPool;
/*     */ import spc.webos.queue.IOnMessage;
/*     */ import spc.webos.queue.QueueMessage;
/*     */ 
/*     */ class ESB2OnMessage
/*     */   implements IOnMessage
/*     */ {
/* 591 */   protected Logger log = Logger.getLogger("spc.webos.endpoint.ESB2");
/*     */   protected ESB2 esb2;
/*     */ 
/*     */   public ESB2OnMessage(ESB2 esb2)
/*     */   {
/* 595 */     this.esb2 = esb2;
/*     */   }
/*     */ 
/*     */   public void onMessage(Object obj, AccessTPool pool, AbstractReceiverThread thread) throws Exception
/*     */   {
/* 600 */     QueueMessage qmsg = (QueueMessage)obj;
/* 601 */     String corId = new String(qmsg.correlationId);
/* 602 */     if (this.log.isDebugEnabled())
/* 603 */       this.log.debug("response:" + new String(qmsg.buf, "UTF-8"));
/* 604 */     if (this.log.isInfoEnabled())
/* 605 */       this.log.info("response corId:" + corId + ", msgId:" + 
/* 606 */         new String(qmsg.messageId) + ", len:" + qmsg.buf.length + 
/* 607 */         ", cache:" + this.esb2.cache.getName() + ",size:" + 
/* 608 */         this.esb2.cache.size() + "\n\n");
/* 609 */     this.esb2.cache.put(corId, qmsg);
/*     */   }
/*     */ }

/* Location:           D:\yc-svn\yc-esb\ESBAPI\lib\spc-client.jar
 * Qualified Name:     spc.webos.endpoint.ESB2OnMessage
 * JD-Core Version:    0.5.4
 */